package com.homegoods.videomodule.item;

import com.homegoods.classify.model.Constant;
import com.homegoods.videomodule.R;
import com.homegoods.videomodule.model.FreedomCommunityModel;
import com.kedll.library.adapter.MultiTypeAdapter;
import com.kedll.library.mvp.BaseItem;

/**
 * @author QiQi
 * @ClassName: FreedomCommunityItem
 * @date 2018/10/8
 * @description
 */
public class FreedomCommunityItem extends BaseItem<FreedomCommunityModel> {
    public FreedomCommunityItem(FreedomCommunityModel data, MultiTypeAdapter adapter) {
        super(data);
        setOnClickListener(v -> {
            if (adapter.getOnItemClickListener() != null) {
                adapter.getOnItemClickListener().onItemClicked(v, this);
            }
        });

    }

    public String getSmallPic() {
        return Constant.SERVER_URL + getData().getSmallPic();
    }

    public String getTitle() {
        return getData().getTitle();
    }

    public String getCollectVol() {
        return String.valueOf(getData().getCollectVol());
    }

    public String getRadius() {
        return "4";
    }

    @Override
    public int getLayout() {
        return R.layout.video_item_freedom_community;
    }
}
